package cn.liu.poi;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author LIU
 * @version 1.0.0
 * @date 2025/7/3
 */
public class RegexExample {
    public static void main(String[] args) {
        String text = "ABC123AAA";
        String regex = "[A-Z]+";
        Pattern pattern = Pattern.compile(regex);

        Matcher matcher = pattern.matcher(text);

        while (matcher.find()) {
            System.out.println(matcher.group());
        }
    }
}
